﻿--DeploymentId, RoleRowId, RoleName, InstanceNumber, DateTimeUTC, LogName, LogSource, EventLevel, [Description], LogType


CREATE VIEW vw_DiagnosticsInfrastructureLogEntry_Detailed
AS

Select A.DiagnosticsInfrastructureLogEntryRowId, B.DeploymentId, A.RoleRowId, B.RoleName, InstanceNumber, A.[DiagnosticsInfrastructureFunctionRowId], C.[FunctionName], DateTimeUTC,Line,MDRESULT,ErrorCode,ErrorCodeMessage, EventLevel, D.EventLevelName, [Message]
From DiagnosticsInfrastructureLogEntry A
	Left Outer Join Role B	
		On A.RoleRowId = B.RoleRowId
	Left Outer Join [dbo].[DiagnosticsInfrastructureFunction] C
		On A.[DiagnosticsInfrastructureFunctionRowId] = C.[DiagnosticsInfrastructureFunctionRowId]
	Left Outer Join EventLevel D
		On A.EventLevel = D.EventLevelId



